This is my GTA IFP Animation importer/Exporter script for Max & GMax.

News(16Aug05)
=============
- More user friendly message
- detect different version of ifp and show useful message 

- animation now import(start) at your slidertime position.
- 'Skip Pos keys' checkbox added
- batch animation import added


Make sure IFPio_Fn.ms.mse is in your scripts/GTA_Tools folder!
or you have to edit the line in GTA_IFP_IO.ms to suit your need!

if IFPioInfo == undefined then fileIn (scriptspath+"\\GTA_Tools\\IFPio_Fn.ms") quiet:true 
                                                      ^^^^^^^^^

Run GTA_IFP_IO.ms in (G)Max->Maxscript->Run Script
a new GUI will popout.

This is NOT a clone of Lance IFPImport script, I don't even use any line
of his code here. So the run down are different!

Here is how to use my script:

Import Animation
================
a. Import any DFF(s) into Max.(IMPORTANT! Don't change the objects name) 
b. Load a ifp file
c. Select all the parts you want to apply animation to.
d. Press the little 'M' button so it store the original transformation of the models.
e. Select any animation in listbox and press 'Apply Anim' button.
f. To restore the original Position, press the little 'R' button.

Since animation data only apply to the selected objects with SAME name
as in the animation.(eg. Smid data in ifp only apply to Smid mesh in Max)
Specific animations applies to specific models only. So not all animation
appliable.
You can have different models in you scene, only selected one will be
applied! But don't select them together. Also you can just select some 
parts to apply animation.

Export Animation
================
a. Select ALL OBJECTS in Hierarchy include Root Parent object.
   (eg:dummy 'Player' for GTA3, mesh 'Root' for VC)
b. 'Sibling/Bone ID' checkbutton allow you to choose the Indexing method.
c. Press 'Save' button will allow you to save CURRENT animation(Just 1) to a new ifp file.
                                              ^^^^^^^
d. Press 'Replace' will replace current animation to the one highlighted in listbox.

Backup your original ifp file before using 'Replace' function!
Bone ID will store to each object's User Properity automatically when 
you import animation. Edit in your own risk!


**GTA animation are in second base. So when you import the animation 
into (G)MAX. Depend on your FrameRate setting in (G)Max. Keys 
generated in different frames. eg:LHand had 12 keys and animation 
finished in 1 second. If you set your system to PAL, last key will 
be at 30f. At 24f if NTSC and 25 for FILM. So you can import/export 
real time animation and make your own discreet animation. 


While GMax user have to Copy/Paste the code to a text file and run
'T2B.exe <yourfile.txt> <yourfile.ifp>' to create a real ifp file.

'Replace' in GMax need some extra work!
1. use the ifpdump.ms to dump the whole ifp to text format.
2. as above step to create the 'ReplaceIFP.txt' 
3. open this 'ReplaceIFP.txt' and the 'dump out text file' in any
   text editor and replace the Header section and the animation
   section correspondingly.
4. run 'T2B.exe' to create a real ifp file.


Limitation
==========
Sibling are calculated each time you save/replace.
I assume that each model have 5 chains.
	Root-Head			Swaist-Shead
	L Thigh-L Toe0			Supperarml-SLhand
	R Thigh-R Toe0			Supperarmr-SRLhand
	Bip01 L Clavicle-L Finger	Supperlegl-Sfootl
	Bip01 R Clavicle-R Finger	Supperlegr-Sfootr
A whole chain can be missing when there is no animation.
But you can't have any member in the middle of chain missing.
eg: L Calf can't be missing while the other have animation data!
(But it seems the top or bottom one can be missing!! Not sure!!)
Be sure to add some keys there!



**Remember GMax won't let you export anything apart from Listener,
so you have to copy & paste the codes in listener to a text file.

A tool 'GMaxSLGRAB.exe' make our life easier! Thanks spot form 
yafray forum. Just press the 'Grab' button will save the text file
automatically.

Then use the command-line program 'T2B.exe' to convert it to dff!
In DOS command-line, type "T2B <file.txt> <file.dff>"
Special Thanks to Delfi from gtaforum, without this program,
We could never export binary from GMax!

If you don't have them. You have to download them from my site.

Kam.
kam.lai@ntlworld.com